Chapter 6 - Handling Graphics
This chapter shows you how to write applications that allow the user to create, select, edit, scale, and drag geometric shapes and how to create and manipulate picture and bitmap shapes. The recipes in this chapter also show you two different ways you can provide feedback as the user drags the mouse.This chapter focuses on recipes that show you how to use QuickDraw GX to provide simple user interface for graphics-handling applications. Specifically, this chapter contains five recipes:
You should be familiar with the code in the recipes from Chapter 4, "Using the QuickDraw GX Environment," and Chapter 5, "Using Macintosh Windows," before you use the recipes in this chapter.
- The first recipe, "Creating Geometric Shapes," shows you how to create an application that allows the user to build a path shape by clicking the mouse to specify the positions of its geometric points.
- The second recipe, "Selecting Shapes," shows you how to use hit-testing to allow the user to select a previously created path shape. This recipe draws geometry control handles to show the location of the geometric points of the selected path shape.
- The third recipe, "Editing Shape Geometries," shows you how to allow the user to edit the selected path shape by dragging its geometry control handles. This recipe uses a transfer mode to provide feedback as the user drags the mouse.
- The fourth recipe, "Editing Shape Transforms," shows you how to allow the user to edit the transform mapping of the selected path shape by using transform control handles rather than geometry control handles.
- The fifth recipe, "Dragging Shapes Using Offscreen Bitmaps," shows you how to allow the user to drag shapes around a window. This recipe uses offscreen bitmaps to provide smooth feedback while the user drags the selected shape.
Chapter Contents
- Creating Geometric Shapes
- Overview of Recipe Steps
- Functions Used in This Recipe
- Recipe Step Descriptions
- Related Recipes
- Selecting Shapes
- Overview of Recipe Steps
- Functions Used in This Recipe
- Recipe Step Descriptions
- Related Recipes
- Editing Shape Geometries
- Overview of Recipe Steps
- Functions Used in This Recipe
- Recipe Step Descriptions
- Related Recipes
- Editing Shape Transforms
- Overview of Recipe Steps
- Functions Used in This Recipe
- Recipe Step Descriptions
- Related Recipes
- Dragging Shapes Using Offscreen Bitmaps
- Overview of Recipe Steps
- Functions Used in This Recipe
- Recipe Step Descriptions
- Related Recipes
Main | Page One | What's New | Apple Computer, Inc. | Find It | Contact Us | Help